package com.nhjf.mobile.bus.exception;

import java.util.concurrent.Callable;

import com.nhjf.exception.CzshopException;


/**
 * 根据异常信息、处理器、处理配置去调度异常处理器ExceptionHandler实现的任务类
 * 
 * @author yuxx
 * 
 */
public class HandleTask implements Callable<ExceptionHandleResult> {

	private ExceptionHandler handler;

	private ExceptionHandleConfig config;

	private CzshopException e;

	@Override
	public ExceptionHandleResult call() throws Exception {
		// TODO Auto-generated method stub 待实现
		return handler.handle(e);
	}

	public ExceptionHandler getHandler() {
		return handler;
	}

	public void setHandler(ExceptionHandler handler) {
		this.handler = handler;
	}

	public ExceptionHandleConfig getConfig() {
		return config;
	}

	public void setConfig(ExceptionHandleConfig config) {
		this.config = config;
	}

	public CzshopException getE() {
		return e;
	}

	public void setE(CzshopException e) {
		this.e = e;
	}

}
